-
Notifications
You must be signed in to change notification settings - Fork 1.4k
chore: changelog in beta release #6899
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
WalkthroughAdds automated changelog generation and consumption to mobile CI: a new workflow creates a release-changelog artifact; build jobs depend on it and download/process the changelog before uploading to Play Store or TestFlight with truncation and conditional metadata steps. Changes
Sequence Diagram(s)sequenceDiagram
participant GH as GitHub Actions
participant Gen as generate-changelog Job
participant AB as android-build Job
participant IB as ios-build Job
participant AU as upload-android Action
participant IU as upload-ios Action
participant PS as Play Store
participant TF as TestFlight
GH->>Gen: run generate-changelog
Gen->>Gen: determine latest tag, collect commits, write changelog.txt
Gen->>GH: upload release-changelog artifact
GH->>AB: run android build (needs: generate-changelog)
GH->>IB: run ios build (needs: generate-changelog)
GH->>AU: invoke upload-android (provides BUILD_VERSION)
AU->>GH: download release-changelog
AU->>AU: prepare metadata file (truncate/copy/default)
AU->>PS: upload via Fastlane (includes changelog/metadata as configured)
GH->>IU: invoke upload-ios
IU->>GH: download release-changelog (when official+develop)
IU->>IU: read/truncate changelog (4000 chars)
IU->>TF: upload via Fastlane (pilot_options include changelog/external distro)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
🧹 Recent nitpick comments
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (2)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
🔇 Additional comments (1)
✏️ Tip: You can disable this entire section by setting Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Android Build Available Rocket.Chat 4.69.0.108001 Internal App Sharing: https://play.google.com/apps/test/RQQ8k09hlnQ/ahAO29uNQhoTsxmapo5mj98NNCxxdSnrKUTquuEmOiE-fiFX3p3KdkvRRkxg1jfZRWQlLJJvPEewrRjZVX9uX-wG4h |
|
Android Build Available Rocket.Chat 4.69.0.108124 Internal App Sharing: https://play.google.com/apps/test/RQQ8k09hlnQ/ahAO29uNSV2gEI6TCh7ghPqnic_xI-vXidHbOjKj9Wr0znBv18AEK8pv0ql-nwpNH17zORH1TAsZC0KeNzyCSs7okb |
|
Android Build Available Rocket.Chat Experimental 4.69.0.108127 Internal App Sharing: https://play.google.com/apps/test/RQVpXLytHNc/ahAO29uNTLjf15VmIQmjjtsjvFhrbNCvEF8qSn5_WCpWXUKBuXLWVrX0nbcfqEBuN8Fya3Vy84CdsRCh08m-O5cX3B |
|
iOS Build Available Rocket.Chat Experimental 4.69.0.108125 |
|
Android Build Available Rocket.Chat 4.69.0.108124 |
|
Android Build Available Rocket.Chat Experimental 4.69.0.108127 |
|
iOS Build Available Rocket.Chat 4.69.0.108126 |
| name: Upload | ||
| runs-on: ubuntu-latest | ||
| needs: [upload-hold] | ||
| needs: [build-android, upload-hold] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change has been made, so I can access BUILD_VERSION from the build-android step
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In @.github/actions/upload-android/action.yml:
- Around line 62-81: The changelog handling uses byte-based wc -c/head -c and
unquoted $BUILD_VERSION which can break UTF-8 and fail for names with spaces;
update the script to perform character-based truncation (e.g., use a UTF-8 aware
tool such as awk/printf or a short python/perl one-liner to take the first 500
characters and append "..." only when truncated) instead of wc -c/head -c, and
always quote variables and paths (use "$BUILD_VERSION", quote file expansions
like "android/fastlane/metadata/android/en-US/changelogs/$BUILD_VERSION.txt" and
"changelog.txt") so multi-byte characters remain valid and filenames with
special characters are safe.
In @.github/workflows/generate-changelog.yml:
- Around line 17-26: The workflow currently sets LATEST_RELEASE_TAG and always
runs git log "$LATEST_RELEASE_TAG"..HEAD which expands to an empty range when
there are no tags; modify the "Generate changelog" step to check if
LATEST_RELEASE_TAG is empty and use a different git-log invocation in that case
(e.g., git log --pretty=format:"- %s" --no-merges HEAD > changelog.txt),
otherwise keep the existing git log "$LATEST_RELEASE_TAG"..HEAD > changelog.txt;
ensure the guard uses the LATEST_RELEASE_TAG variable and still writes a
fallback "- Improvements and bug fixes" to changelog.txt if the resulting file
is empty.
🧹 Nitpick comments (3)
.github/actions/upload-ios/action.yml (1)
112-116: Consider adding a descriptive step name for clarity in workflow logs.The step works correctly but lacks a
namefield, which makes debugging workflow runs harder.Suggested improvement
- - uses: actions/download-artifact@v4 + - name: Download release changelog + uses: actions/download-artifact@v4 if: ${{ inputs.type == 'official' && inputs.trigger == 'develop' }} with: name: release-changelog path: .ios/fastlane/Fastfile (1)
57-57: Consider extracting the hardcoded group name.The "External Testers" group name is hardcoded. If this needs to change or vary by environment, consider extracting it to an environment variable or constant.
.github/actions/upload-android/action.yml (1)
56-61: Consider handling missing artifact gracefully.If the
release-changelogartifact is missing or thegenerate-changelogjob failed, this step will fail the entire workflow. Consider addingcontinue-on-error: trueif a fallback changelog is acceptable, since line 77 already handles the missingchangelog.txtcase.💡 Optional: Add continue-on-error for graceful fallback
- uses: actions/download-artifact@v4 if: ${{ inputs.trigger == 'develop' }} + continue-on-error: true with: name: release-changelog path: .
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (7)
.github/actions/upload-android/action.yml.github/actions/upload-ios/action.yml.github/workflows/build-develop.yml.github/workflows/build-official-android.yml.github/workflows/generate-changelog.ymlandroid/fastlane/Fastfileios/fastlane/Fastfile
🧰 Additional context used
🪛 RuboCop (1.82.1)
ios/fastlane/Fastfile
[warning] 39-39: Useless assignment to variable - api_key.
(Lint/UselessAssignment)
🔇 Additional comments (9)
android/fastlane/Fastfile (1)
81-85: LGTM! Upload options align with changelog strategy.The configuration correctly enables changelog upload (
skip_upload_changelogs: false) while skipping unnecessary metadata, images, and screenshots. This aligns with the PR's goal of including release notes in the beta channel..github/workflows/generate-changelog.yml (1)
28-33: Artifact configuration looks good.The 15-day retention is reasonable for CI artifacts, and the artifact name
release-changelogmatches what the downstream iOS and Android upload actions expect.ios/fastlane/Fastfile (3)
32-37: Changelog handling logic is correct.The path resolution and truncation to 4000 characters (App Store limit) with proper ellipsis handling looks good. The conditional assignment correctly returns
nilwhen the file doesn't exist.
39-44: Static analysis false positive -api_keyis used implicitly.The
app_store_connect_api_keyaction stores the key in Fastlane's lane context, making it automatically available to subsequent actions likepilot. This is standard Fastlane behavior.
46-60: Pilot options configuration is well-structured.The conditional logic correctly:
- Waits for build processing only when external distribution is needed (
!(options[:official] && changelog))- Enables external distribution with proper notification settings when a changelog exists for official builds
.github/workflows/build-official-android.yml (1)
75-88: LGTM! Dependency chain and BUILD_VERSION sourcing are correct.The changes properly:
- Add explicit dependency on
build-androidto ensure the build completes before upload- Source
BUILD_VERSIONdirectly frombuild-android.outputsrather than through the passthrough inupload-hold, which is cleaner and more maintainableThe conditional logic on line 76 correctly handles both manual approval (PR trigger) and automatic flow (develop trigger) scenarios.
.github/workflows/build-develop.yml (2)
22-60: LGTM! Build job dependencies updated correctly.All four build jobs (
android-build-experimental-store,android-build-official-store,ios-build-experimental-store,ios-build-official-store) now correctly depend on bothrun-eslint-and-testandgenerate-changelog, ensuring the changelog artifact is available before builds start.
17-20: LGTM! New changelog generation job is well-structured.The job correctly depends on
run-eslint-and-testand references the reusable workflow. The workflow does not requiresecrets: inherit—it uses only standard GitHub Actions (checkout, git commands, artifact upload) that work with default permissions..github/actions/upload-android/action.yml (1)
83-95: LGTM! Fastlane upload logic correctly handles all trigger/type combinations.The conditional structure covers all expected cases:
prtrigger → beta lanedevelop+experimental→ experimental_productiondevelop+official→ official_open_testing
diegolmello
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Handle code rabbit
|
@CodeRabbit review |
✅ Actions performedReview triggered.
|
Proposed changes
This PR introduce the change where, when a pull request is merged into the develop branch, the CI pipeline will:
Build PR Action: https://github.com/RocketChat/Rocket.Chat.ReactNative/actions/runs/20957468091
Build Develop Action: https://github.com/RocketChat/Rocket.Chat.ReactNative/actions/runs/20957466882
Issue(s)
https://rocketchat.atlassian.net/browse/CORE-1634
How to test or reproduce
Screenshots
Types of changes
Checklist
Further comments
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.